package com.vpx.server.utils;

import cn.hutool.core.util.XmlUtil;
import org.w3c.dom.Document;
import org.w3c.dom.Element;

public class XmlCreateTestUtils {
    public static void main(String[] s) {
        Document document = XmlUtil.createXml();
        Element element1 = document.createElement("Project");
        element1.setAttribute("version","ADE3.3.4.20230522_Release");
        element1.setAttribute("NodeEnable","true");
        element1.setAttribute("EXISTQUOTE","true");

        Element element1_1 = document.createElement("ProjectName");
        element1_1.setTextContent("车联网态势感知功能测试");

        Element element1_2 = document.createElement("HardFile");
        element1_2.setAttribute("EXISTQUOTE","true");
        element1_2.setAttribute("NodeEnable","true");

        Element element1_2_1 = document.createElement("ProjectHardConfig");
        element1_2_1.setAttribute("NodeEnable","true");
        element1_2_1.setAttribute("EXISTQUOTE","true");

        Element element1_2_1_1 = document.createElement("FileName");
        element1_2_1_1.setTextContent("车联网态势感知功能测试_Prj_HardConfig.xml");
        element1_2_1.appendChild(element1_2_1_1);

        Element element1_3 = document.createElement("BusFile");
        element1_3.setAttribute("NodeEnable","true");
        element1_3.setAttribute("EXISTQUOTE","true");

        Element element1_3_1 = document.createElement("ProjectBusConfig");
        element1_3_1.setAttribute("NodeEnable","true");
        element1_3_1.setAttribute("EXISTQUOTE","true");

        Element element1_3_1_1 = document.createElement("FileName");
        element1_3_1_1.setTextContent("车联网态势感知功能测试_Prj_BusConfig.xml");
        element1_3_1.appendChild(element1_3_1_1);

        Element element1_4 = document.createElement("ObserverFile");
        element1_4.setAttribute("NodeEnable","true");
        element1_4.setAttribute("EXISTQUOTE","true");
        Element element1_4_1 = document.createElement("FileName");
        element1_4_1.setTextContent("车联网态势感知功能测试_Prj_ObserverConfig.xml");
        element1_4.appendChild(element1_4_1);

        Element element1_5 = document.createElement("ShareFile");
        element1_5.setAttribute("NodeEnable","true");
        element1_5.setAttribute("EXISTQUOTE","true");
        Element element1_5_1 = document.createElement("FileName");
        element1_5_1.setTextContent("车联网态势感知功能测试_Prj_ShareConfig.xml");
        element1_5.appendChild(element1_5_1);

        Element element1_6 = document.createElement("ProtocolFile");
        element1_6.setAttribute("NodeEnable","true");
        element1_6.setAttribute("EXISTQUOTE","true");
        Element element1_6_1 = document.createElement("FileName");
        element1_6_1.setTextContent("车联网态势感知功能测试_Prj_ProtocolConfig.xml");
        Element element1_6_2 = document.createElement("ProtocolFile");
        element1_6_2.setAttribute("NodeEnable","true");
        element1_6_2.setAttribute("EXISTQUOTE","true");
        element1_6.appendChild(element1_6_1);
        element1_6.appendChild(element1_6_2);

        Element element1_7 = document.createElement("FlowTemplate");
        Element element1_7_1 = document.createElement("StepTemp");
        element1_7_1.setAttribute("NodeEnable","true");
        element1_7_1.setAttribute("EXISTQUOTE","true");
        Element element1_7_1_1 = document.createElement("FileName");
        element1_7_1_1.setTextContent("JudgeMuiltStep.xml");
        element1_7_1.appendChild(element1_7_1_1);
        Element element1_7_1_2 = document.createElement("FileName");
        element1_7_1_2.setTextContent("CalcFunctionStep.xml");
        element1_7_1.appendChild(element1_7_1_2);
        Element element1_7_1_3 = document.createElement("FileName");
        element1_7_1_3.setTextContent("JudgeStep.xml");
        element1_7_1.appendChild(element1_7_1_3);
        Element element1_7_1_4 = document.createElement("FileName");
        element1_7_1_4.setTextContent("DataCapStep.xml");
        element1_7_1.appendChild(element1_7_1_4);
        Element element1_7_2 = document.createElement("StepSetTemp");
        element1_7_2.setAttribute("NodeEnable","true");
        element1_7_2.setAttribute("EXISTQUOTE","true");
        Element element1_7_3 = document.createElement("CaseTemp");
        element1_7_3.setAttribute("NodeEnable","true");
        element1_7_3.setAttribute("EXISTQUOTE","true");
        Element element1_7_4 = document.createElement("CaseSetTemp");
        element1_7_4.setAttribute("NodeEnable","true");
        element1_7_4.setAttribute("EXISTQUOTE","true");
        Element element1_7_5 = document.createElement("ProcedureTemp");
        element1_7_5.setAttribute("NodeEnable","true");
        element1_7_5.setAttribute("EXISTQUOTE","true");
        Element element1_7_6 = document.createElement("ProcedureSetTemp");
        element1_7_6.setAttribute("NodeEnable","true");
        element1_7_6.setAttribute("EXISTQUOTE","true");
        Element element1_7_7 = document.createElement("CommonTemp");
        element1_7_7.setAttribute("NodeEnable","true");
        element1_7_7.setAttribute("EXISTQUOTE","true");
        Element element1_7_7_1 = document.createElement("FileName");
        element1_7_7_1.setTextContent("JudgeMuiltStep.xml");
        element1_7_7.appendChild(element1_7_7_1);
        Element element1_7_7_2 = document.createElement("FileName");
        element1_7_7_2.setTextContent("CalcFunctionStep.xml");
        element1_7_7.appendChild(element1_7_7_2);
        Element element1_7_7_3 = document.createElement("FileName");
        element1_7_7_3.setTextContent("JudgeStep.xml");
        element1_7_7.appendChild(element1_7_7_3);

        element1_7.appendChild(element1_7_1);
        element1_7.appendChild(element1_7_2);
        element1_7.appendChild(element1_7_3);
        element1_7.appendChild(element1_7_4);
        element1_7.appendChild(element1_7_5);
        element1_7.appendChild(element1_7_6);
        element1_7.appendChild(element1_7_7);

        Element element1_8 = document.createElement("Device");
        Element element1_8_1 = document.createElement("DeviceName");
        element1_8_1.setTextContent("态势感知功能测试");
        Element element1_8_2 = document.createElement("HardConfig");
        Element element1_8_2_1 = document.createElement("FileName");
        element1_8_2_1.setTextContent("态势感知功能测试_HardCondfig.xml");
        element1_8_2.appendChild(element1_8_2_1);
        Element element1_8_3 = document.createElement("TestXML");
        Element element1_8_3_1 = document.createElement("FileName");
        element1_8_3_1.setTextContent("态势感知功能测试_Test.xml");
        element1_8_3.appendChild(element1_8_3_1);
        element1_8.appendChild(element1_8_1);
        element1_8.appendChild(element1_8_2);
        element1_8.appendChild(element1_8_3);

        element1.appendChild(element1_1);
        element1.appendChild(element1_2);
        element1.appendChild(element1_3);
        element1.appendChild(element1_4);
        element1.appendChild(element1_5);
        element1.appendChild(element1_6);
        element1.appendChild(element1_7);
        element1.appendChild(element1_8);
        document.appendChild(element1);
        XmlUtil.toFile(document,"D:\\aaa\\车联网态势感知功能测试.xml");
    }
}
